package feng.demo.service;

import feng.demo.entity.Commodity;
import feng.demo.entity.Coms;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface CommodityService {
    List<Commodity> findAll();
    Commodity findById(Integer comid);
    List<Commodity> findByUid(Integer uid);
    List<Commodity> findByTypeid(Integer typeid);
    List<Commodity> findAllLimit(Integer pagenum,Integer lines);
    List<Commodity> findByIdLimit(Integer comid, Integer pagenum,Integer lines);
    List<Commodity> findByUidLimit(Integer uid, Integer pagenum,Integer lines);
    List<Commodity> findByTypeidLimit(Integer typeid,Integer pagenum, Integer lines);
    List<Commodity> findByCommodity(Map<String,Object> map);
    int add(Commodity commodity);
    int del(Integer comid);
    int update(Commodity commodity);
    List<Commodity> findBySort(Integer pagenum,Integer lines);
    int CountAll();
    int CountByTypeid(Integer typeid);
    int CountByUid(Integer uid);
    List<Commodity> findRemark(Integer uid,Integer pagenum,Integer lines);
    List<Commodity> findByque(String s);
    List<Commodity> findByCusUid(@Param("uid") Integer uid,@Param("pagenum") Integer pagenum, @Param("lines")Integer lines);
    int CountByCusUid(Integer uid);
}
